package com.hermes.action.json;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.hermes.common.action.AsynBaseAction;
import com.hermes.common.util.LoginHelperUtil;

public class AsynGetLoginInfo  extends AsynBaseAction{

	/**
	 * 异步判断用户是否登录
	 */
	private static final long serialVersionUID = 4536386072068344520L;

	public String result = "false";
	
	@Override
	public String execute() throws Exception {

		HttpServletRequest request = ServletActionContext.getRequest();
		
		LoginHelperUtil loginUtil = new LoginHelperUtil(request);
		
		if(loginUtil.hasLogined()){
			result="true";
		}
		
		return SUCCESS;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

}
